#pragma once

#include "sql/operator/logical_operator.h"

class UpdateLogicalOperator : public LogicalOperator
{
public:
    UpdateLogicalOperator(Table *table, Field *field, Value *value, int value_amount);
    virtual ~UpdateLogicalOperator() = default;

    LogicalOperatorType type() const override
    {
        return LogicalOperatorType::UPDATE;
    }
    Table *table() const
    {
        return table_;
    }
    Field *field() const
    {
        return field_;
    }
    Value *value() const
    {
        return value_;
    }
    int value_amount() const
    {
        return value_amount_;
    }

private:
    Table *table_ = nullptr;
    Field *field_ = nullptr;
    Value *value_ = nullptr;
    int value_amount_ = 0;
};